package cn.com.fig.control;

import cn.com.fig.common.ReplyMsg;
import cn.com.fig.common.StringMd5Util;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/userControl")
public class UserControl extends BaseControl {
    Logger logger = LoggerFactory.getLogger(getClass());

    /**
     * 新增操作
     * @param statement
     * @param department
     * @return
     */
    @RequestMapping("/PUT/{statement}")
    public ReplyMsg insert(@PathVariable String statement,
                           @RequestParam Map<String,Object> department){

        department.put("userPassword", StringMd5Util.GetMd5StrInfo("Abcd1234"));
        return super.baseService.save(statement, department);
    }
}
